<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">
<body>

<ui:composition template="/templates/Plantilla.xhtml">
 <ui:define name="content">
  <h:form class="form">
  <p:growl id="growl1" />
  <p:messages id="messages" showDetail="true" autoUpdate="true" closable="true" />
	<h3> Nuevo Frio Calor</h3>
	<p:separator/>
	 <p:panel >
	        <h:panelGrid columns="3" columnClasses="label, value" styleClass="grid">
	        
			<h:outputText for="numeroSerie" value="Numero de Serie: *"/>
			<h:panelGroup>
				<p:inputText id="numeroSerie" value="#{frioCalorCreate.frioCalor.numeroDeSerie}" autocomplete="off" label="Numero de Serie"
				onkeyup="javascript:this.value=this.value.toUpperCase();">
					<p:ajax update="errorNumeroSerie, guardar" event="keyup"  listener="#{frioCalorCreate.listenerNumeroSerie}"/> 
				</p:inputText>
			</h:panelGroup>
			<p:messages id="errorNumeroSerie" ></p:messages>

			<h:outputText for="marca" value="Marca: *"/>
			<h:panelGroup>
				<p:inputText id="marca" value="#{frioCalorCreate.frioCalor.marca}" autocomplete="off" label="Marca"
				onkeyup="javascript:this.value=this.value.toUpperCase();">
					<p:ajax update="errorMarca, guardar" event="keyup"  listener="#{frioCalorCreate.listenerMarca}"/> 
				</p:inputText>
			</h:panelGroup>
			<p:messages id="errorMarca" ></p:messages>
			
			<h:outputText for="modelo" value="Modelo *"/>
			<h:panelGroup>
				<p:inputText id="modelo" value="#{frioCalorCreate.frioCalor.modelo}" autocomplete="off" label="Modelo"
				onkeyup="javascript:this.value=this.value.toUpperCase();">
					<p:ajax update="errorModelo, guardar" event="keyup"  listener="#{frioCalorCreate.listenerModelo}"/> 
				</p:inputText>
			</h:panelGroup>
			<p:messages id="errorModelo" ></p:messages>
			
			<h:outputText for="modelo" value="Agua de Red:"/>
			<p:selectBooleanCheckbox value="#{frioCalorCreate.aguaDeRed}"/>
		</h:panelGrid>
	</p:panel>
	<p:panel style="text-align: center">
			<p:commandButton value="Guardar" id="guardar" 
				action="#{frioCalorCreate.guardarFrioCalor(frioCalorCreate.frioCalor)}" update="growl1" disabled="#{frioCalorCreate.deshabilitarGuardar}" 
				icon="ui-icon-disk">	
			</p:commandButton>
			<p:commandButton value="Cancelar" action="#{frioCalorCreate.cancelar()}" immediate="true"></p:commandButton>
	</p:panel>				
	</h:form>	
</ui:define>
</ui:composition>	
</body>
</html>